-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test/rest checksum crc64nvme #1096
base: main
Are you sure you want to change the base?
Conversation
ccf8754
to
9097d2a
Compare
b5a4573
to
d10bd4d
Compare
import sys | ||
from awscrt import checksums | ||
|
||
with open(sys.argv[1], 'rb') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like something that could be built into the test vm itself, so that we don't have to keep installing it. Perhaps as a pre-built script that is installed and can then be executed as needed?
|
||
@test "REST - PutObject rejects invalid sha256 checksum" { | ||
test_file="test_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is set the same for all tests, should just be a default at the top of the test file.
} | ||
|
||
@test "test_rest_versioning" { | ||
test_file="test_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More shared settings.
crc64_file() { | ||
source ./env/bin/activate | ||
python3 -m pip install awscrt | ||
if ! checksum=$(python3 -c "import sys;from awscrt import checksums;crc64nvme_value = checksums.crc64nvme(sys.argv[1]);print(crc64nvme_value)" "$1"); then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More of this little built in script - if we are doing repeat code then it really should be stored separately.
No description provided.